// window.onerror=function(){return true;}  //隐蔽页面报错

if(document.readyState == "complete"){
  load();
}else if(document.addEventListener){   //高级浏览器支持该监听方式
  document.addEventListener("DOMContentLoaded",function(){
   load() 
 });
}else{                                 //低版本浏览器
  document.attachEvent("onreadystatechange",function(){
      if(document.readyState == "complete"){
          load();
      }
  })
}

function load(){
  var style = document.getElementsByTagName("style")[0];
  var script = document.getElementById("script");
  script.type = "text/text";
  var template = document.getElementById("template");
  var name = template.getAttribute("name");
  sessionStorage["style"+name] = style.innerHTML;
  sessionStorage["body"+name] = template.innerHTML;
  sessionStorage["script"+name] = script.innerHTML;
  sessionStorage["bool"+name] = "true";

  // console.log("bool"+name,22222)
} 